package com.fin.zw.aiqas.model.component;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.context.annotation.Description;

import java.util.Objects;

@Data
@Description("命中规则统计")
public class RuleHitStatistics {
    public RuleHitStatistics(Long ruleId, String ruleName,Integer countSum) {
        this.ruleId = ruleId;
        this.ruleName = ruleName;
        this.countSum = countSum;
    }

    @ApiModelProperty(notes = "规则ID")
    private Long ruleId;

    @ApiModelProperty(notes = "规则名称")
    private String ruleName;

    @ApiModelProperty(notes = "统计出现次数")
    private Integer countSum =0;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        RuleHitStatistics that = (RuleHitStatistics) o;
        return ruleId.equals(that.ruleId) &&
                ruleName.equals(that.ruleName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(ruleId, ruleName);
    }
}
